<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<% 
	String path = request.getContextPath();
%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<c:set var="path" value="${pageContext.request.contextPath}" ></c:set>
<script type="text/javascript" src="${path }/js/jquery-3.6.0.min.js""></script>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>修改个人信息</title>

    <link rel="icon" type="image/png" href="<%= path %>/assets/images/favicon-32x32.png">
    <!-- Base Styling  -->
    <link rel="stylesheet" href="<%= path %>/assets/main/css/fonts.css">
    <link rel="stylesheet" href="<%= path %>/assets/main/css/style.css">
</head>

<body>
    <div id="main-wrapper" class="show">
        <div class="nav-header">
            <div class="brand-logo">
                <a href="collection.jsp"><img class="brand-title" src="<%= path %>/assets/images/logo.png" alt=""></a>
            </div>
        </div>
        <aside class="left-panel nicescroll-box">
          
          
            <nav class="navigation">
                <ul class="list-unstyled main-menu">
                    <li class="has-submenu">
                        <a href="${path }/MyCollectionController?action=getMyCollection">
                            <i class="fas fa-th-large"></i>
                            <span class="nav-label">我的收藏</span>
                        </a>
                    </li>
                    <li class="has-submenu">
                        <a href="${path }/PostController?action=show">
                            <i class="fas fa-calendar-plus"></i>
                            <span class="nav-label">我的发布</span>
                        </a>
                    </li>
                    <li class="has-submenu">
                        <a href="${path }/UpdatePasswordController?action=changeuserpass">
                            <i class="fas fa-chart-pie"></i>
                            <span class="nav-label">修改密码</span>
                        </a>
                    </li>
                    <li class="has-submenu">
                        <a href="${path}/UpdateUserinfoCenterController?action=UpdateUserinfoCenterById">
                            <i class="fas fa-cog"></i>
                            修改个人信息
                        </a>
                    </li>
                     <li class="has-submenu">
                          <a href="${path}/PostNumberLikesController?action=postNumberLikes">
                            <i class="fas fa-cog"></i>
          	获赞               
                        </a>
                    </li>
                    <li class="has-submenu">
                          <a href="${path}/CommentReplyController?action=findAll">
                            <i class="fas fa-cog"></i>
          	我的帖子                
                        </a>
                    </li>
                </ul>
            </nav>
            
            
            <div class="sidebar-widgets">
                <div class="top-sidebar box-shadow mx-25 m-b-30 p-b-20 text-center">
                    <img src="<%= path %>/assets/images/appointement.svg" class="side-img" alt="img">
                </div>
                <div class="copyright text-center">
                    <p class="mb-0"> 中国航天</p>
                    <p class="mb-0"> © 2021 </p>
                </div>
            </div>
        </aside>
 
 
 <script type="text/javascript">
  $(function () {
	  $("#subBtn").click(save);
   })
   
   function save(){
	  if(${empty(sessionScope.userinfo)}){
		  alert("请登录");
	  }
   }
  </script>
  
  
  <jsp:include page="/inc/signter.jsp"></jsp:include>
        

        <div class="content-body">
            <div class="warper container-fluid">
                <div class="doctorino_settings main_container">

                    <div class="row">
                        <div class="col-md-12">
                            <div class="card shadow mb-4">
                                <div class="card-header">
                                    <h4 class="card-title"> 修改个人信息 </h4>
                                </div>
                                <div class="card-body">
                                <!--  -->
                                    <form id="myform" enctype="multipart/form-data"  action="${path }/UpdateUserinfoCenterController?action=getUpdateUserinfoCenter" method="post" >
                                        <div class="row">
                                            <div class="col-xl-6">
                                                <div class="form-group row">
                                                    <label class="col-lg-4 col-form-label">输入昵称
                                                        <span class="text-danger">*</span>
                                                    </label>
                                                    <div class="col-lg-6">
                                                        <input type="text" name="nickname" value="${userinfo.nickname }" class="form-control" placeholder="原来姓名">
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="col-xl-6">
                                                <div class="form-group row">
                                                    <label class="col-lg-4 col-form-label">手机号<span class="text-danger">*</span></label>
                                                    <div class="col-lg-6">
                                                        <input name="phone" value="${userinfo.phone }" type="text" class="form-control" placeholder="原来电话">
                                                    </div>
                                                </div>
                                            </div>
                                            <hr>
                                            <div class="col-xl-6">
                                                <div class="form-group row">
                                                    <label class="col-lg-4 col-form-label">头像<span class="text-danger">*</span></label>
                                                    <div class="col-lg-6">
                                                        <input id="file" name="foodPIC"  type="file" class="form-control">
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="col-xl-12">
                                                <div class="form-group">
                                                    <button id="subBtn" type="button" class="btn btn-primary float-end">保存</button>
                                                </div>
                                            </div>
                                            <hr>
                                        </div>
                                    </form>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <div class="footer">
            <div class="copyright">
                <p class="mb-0">Copyright ©&中国航天 &amp;2021
                </p>
            </div>
        </div>


    </div>

    <script src="<%= path %>/assets/plugins/jquery/jquery.min.js"></script>

    <script src="<%= path %>/assets/plugins/popper/popper.min.js"></script>

    <script src="<%= path %>/assets/plugins/bootstrap/js/bootstrap.min.js"></script>

    <script src="<%= path %>/assets/plugins/moment/moment.min.js"></script>

    <script src="<%= path %>/assets/plugins/daterangepicker/daterangepicker.min.js"></script>

    <script src="<%= path %>/assets/plugins/datatables/jquery.dataTables.min.js"></script>
    <script src="<%= path %>/assets/js/init-tdatatable.js"></script>

    <script src="<%= path %>/assets/js/toggleFullScreen.js"></script>
    <script src="<%= path %>/assets/js/main.js"></script>

</body>

</html>

<script type="text/javascript">
 $(function(){
	 
	 $("#subBtn").click(function(){
		 //询问对话框
		 var inquiry=confirm("您确定修改个人信息吗?");
		 if(inquiry==true){
		 $("#myform").submit();
		 }
	  })
	 
 })
</script>
